package telas.clientes;

import dao.CepDao;
import dao.ClienteDao;
import dao.FuncionarioDao;
import java.math.BigDecimal;
import java.text.ParseException;
import java.util.Date;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
import modelo.Cep;
import modelo.Clientes;
import modelo.Funcionarios;
import telas.Index;
import util.Utilitario;

/**
 *
 * @author gilberto.costa
 */
public class Fr_cliente extends javax.swing.JInternalFrame {

    private List<Funcionarios> listFuncionarios;
    private List<Clientes> listClientes;

    public Fr_cliente() {
        initComponents();
        listFuncionarios = FuncionarioDao.retornaUsuarios();
        listClientes = new ClienteDao().retornaClientes();
        populaComboFuncionarios();
        Utilitario.eventosteclado(jLabel1, "Cliente", rootPane);
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jDayChooser1 = new com.toedter.calendar.JDayChooser();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel1 = new javax.swing.JPanel();
        jPanel2 = new javax.swing.JPanel();
        codigo = new javax.swing.JTextField();
        jLabel1 = new javax.swing.JLabel();
        labelRazao = new javax.swing.JLabel();
        razao = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        comboFuncionario = new javax.swing.JComboBox();
        jLabel4 = new javax.swing.JLabel();
        tipoPessoa = new javax.swing.JComboBox();
        jLabel5 = new javax.swing.JLabel();
        cpf_cnpj = new javax.swing.JFormattedTextField();
        jLabel6 = new javax.swing.JLabel();
        ie_rg = new javax.swing.JFormattedTextField();
        labelNomeFantasia = new javax.swing.JLabel();
        NomeFantasia = new javax.swing.JTextField();
        jPanel5 = new javax.swing.JPanel();
        diaVencimento = new javax.swing.JTextField();
        jLabel17 = new javax.swing.JLabel();
        valorRecibo = new javax.swing.JTextField();
        jLabel14 = new javax.swing.JLabel();
        telefone = new javax.swing.JFormattedTextField();
        jLabel15 = new javax.swing.JLabel();
        celular = new javax.swing.JFormattedTextField();
        jLabel16 = new javax.swing.JLabel();
        cliDesde = new com.toedter.calendar.JDateChooser();
        jPanel3 = new javax.swing.JPanel();
        jLabel7 = new javax.swing.JLabel();
        cep = new javax.swing.JFormattedTextField();
        jLabel8 = new javax.swing.JLabel();
        cidade = new javax.swing.JTextField();
        jLabel9 = new javax.swing.JLabel();
        uf = new javax.swing.JTextField();
        jLabel10 = new javax.swing.JLabel();
        logradouro = new javax.swing.JTextField();
        jLabel11 = new javax.swing.JLabel();
        numero = new javax.swing.JTextField();
        jLabel12 = new javax.swing.JLabel();
        bairro = new javax.swing.JTextField();
        jLabel13 = new javax.swing.JLabel();
        complemento = new javax.swing.JTextField();
        jLabel18 = new javax.swing.JLabel();
        complementoEnd = new javax.swing.JTextField();
        jPanel6 = new javax.swing.JPanel();
        jPanel7 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTextArea1 = new javax.swing.JTextArea();
        jPanel4 = new javax.swing.JPanel();
        BtNovo = new javax.swing.JButton();
        btSalvar = new javax.swing.JButton();
        btEditar = new javax.swing.JButton();
        btExcluir = new javax.swing.JButton();
        btSair = new javax.swing.JButton();
        btDesfazer = new javax.swing.JButton();
        btProximo = new javax.swing.JButton();
        btAnterior = new javax.swing.JButton();

        setIconifiable(true);
        setTitle("Cadastro de clientes");
        getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jPanel2.setBackground(new java.awt.Color(194, 194, 183));
        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Informações basicas", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, new java.awt.Color(0, 44, 255)));
        jPanel2.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        codigo.setEnabled(false);
        jPanel2.add(codigo, new org.netbeans.lib.awtextra.AbsoluteConstraints(95, 18, 103, -1));

        jLabel1.setText("Código");
        jPanel2.add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(6, 19, 77, 25));

        labelRazao.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        labelRazao.setText("Razão Social");
        labelRazao.setPreferredSize(new java.awt.Dimension(37, 25));
        jPanel2.add(labelRazao, new org.netbeans.lib.awtextra.AbsoluteConstraints(6, 85, 85, -1));

        razao.setEditable(false);
        jPanel2.add(razao, new org.netbeans.lib.awtextra.AbsoluteConstraints(115, 82, 704, -1));

        jLabel3.setText("Funcionário");
        jPanel2.add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(216, 19, 89, 25));

        comboFuncionario.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "..::  Selecione  ::.." }));
        comboFuncionario.setEnabled(false);
        jPanel2.add(comboFuncionario, new org.netbeans.lib.awtextra.AbsoluteConstraints(323, 18, 280, -1));

        jLabel4.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jLabel4.setText("Pessoa:  ");
        jPanel2.add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(6, 56, 70, -1));

        tipoPessoa.setFont(new java.awt.Font("Monospaced", 0, 12)); // NOI18N
        tipoPessoa.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "..::  Selecione  ::..", "Fisica", "Juridica" }));
        tipoPessoa.setToolTipText("Selecione Pessoa FISICA ou JURÍDICA");
        tipoPessoa.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED));
        tipoPessoa.setEnabled(false);
        tipoPessoa.setPreferredSize(new java.awt.Dimension(120, 20));
        tipoPessoa.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                tipoPessoaActionPerformed(evt);
            }
        });
        jPanel2.add(tipoPessoa, new org.netbeans.lib.awtextra.AbsoluteConstraints(115, 51, 241, 25));

        jLabel5.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jLabel5.setText("CPF / CNPJ:  ");
        jPanel2.add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(374, 56, -1, -1));

        cpf_cnpj.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED));
        cpf_cnpj.setEditable(false);
        try {
            cpf_cnpj.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("###.###.###-##")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        cpf_cnpj.setToolTipText("Informe se o cliente é Pessoa Física ou Jurídica para Liberar esta campo");
        cpf_cnpj.setFont(new java.awt.Font("Cantarell", 0, 13)); // NOI18N
        cpf_cnpj.setPreferredSize(new java.awt.Dimension(38, 25));
        jPanel2.add(cpf_cnpj, new org.netbeans.lib.awtextra.AbsoluteConstraints(461, 50, 148, -1));

        jLabel6.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jLabel6.setText("RG / IE:  ");
        jPanel2.add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(621, 56, -1, -1));

        ie_rg.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED));
        ie_rg.setEditable(false);
        try {
            ie_rg.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("#########")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        ie_rg.setToolTipText("Informe se o cliente é Pessoa Física ou Jurídica para Liberar esta campo");
        ie_rg.setFont(new java.awt.Font("Cantarell", 0, 13)); // NOI18N
        ie_rg.setPreferredSize(new java.awt.Dimension(38, 25));
        jPanel2.add(ie_rg, new org.netbeans.lib.awtextra.AbsoluteConstraints(685, 50, 130, -1));

        labelNomeFantasia.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        labelNomeFantasia.setText("Nome Fantasia");
        labelNomeFantasia.setPreferredSize(new java.awt.Dimension(37, 25));
        jPanel2.add(labelNomeFantasia, new org.netbeans.lib.awtextra.AbsoluteConstraints(6, 119, 97, -1));

        NomeFantasia.setEditable(false);
        jPanel2.add(NomeFantasia, new org.netbeans.lib.awtextra.AbsoluteConstraints(115, 116, 704, -1));

        jPanel5.setBackground(new java.awt.Color(194, 194, 183));
        jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Dia de vencimento / valor", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, new java.awt.Color(250, 21, 28)));
        jPanel5.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        diaVencimento.setEditable(false);
        jPanel5.add(diaVencimento, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 20, 67, -1));

        jLabel17.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jLabel17.setText("Valor do Recibo");
        jLabel17.setPreferredSize(new java.awt.Dimension(37, 25));
        jPanel5.add(jLabel17, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 20, 111, -1));

        valorRecibo.setEditable(false);
        jPanel5.add(valorRecibo, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 20, 97, -1));

        jPanel2.add(jPanel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(6, 150, 300, 60));

        jLabel14.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jLabel14.setText("Telefone :  ");
        jLabel14.setPreferredSize(new java.awt.Dimension(32, 25));
        jPanel2.add(jLabel14, new org.netbeans.lib.awtextra.AbsoluteConstraints(347, 150, 76, -1));

        telefone.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED));
        telefone.setEditable(false);
        try {
            telefone.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("(##) ####-####")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        telefone.setFont(new java.awt.Font("Cantarell", 0, 13)); // NOI18N
        telefone.setPreferredSize(new java.awt.Dimension(38, 25));
        telefone.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                telefoneActionPerformed(evt);
            }
        });
        jPanel2.add(telefone, new org.netbeans.lib.awtextra.AbsoluteConstraints(435, 150, 138, -1));

        jLabel15.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jLabel15.setText("Celular :  ");
        jLabel15.setPreferredSize(new java.awt.Dimension(32, 25));
        jPanel2.add(jLabel15, new org.netbeans.lib.awtextra.AbsoluteConstraints(585, 150, 69, -1));

        celular.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED));
        celular.setEditable(false);
        try {
            celular.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("(##) ####-####")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        celular.setFont(new java.awt.Font("Cantarell", 0, 13)); // NOI18N
        celular.setPreferredSize(new java.awt.Dimension(38, 25));
        jPanel2.add(celular, new org.netbeans.lib.awtextra.AbsoluteConstraints(666, 150, 150, -1));

        jLabel16.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jLabel16.setText("Cliente desde ");
        jLabel16.setPreferredSize(new java.awt.Dimension(32, 25));
        jPanel2.add(jLabel16, new org.netbeans.lib.awtextra.AbsoluteConstraints(347, 181, 97, 27));

        cliDesde.setEnabled(false);
        jPanel2.add(cliDesde, new org.netbeans.lib.awtextra.AbsoluteConstraints(456, 182, 142, -1));

        jPanel1.add(jPanel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 830, 220));

        jPanel3.setBackground(new java.awt.Color(194, 194, 183));
        jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Endereço", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, new java.awt.Color(0, 44, 255)));
        jPanel3.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jLabel7.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jLabel7.setText("Cep:");
        jLabel7.setPreferredSize(new java.awt.Dimension(37, 25));
        jPanel3.add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(6, 19, 49, -1));

        cep.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED));
        cep.setEditable(false);
        try {
            cep.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("#####-###")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        cep.setFont(new java.awt.Font("Cantarell", 0, 13)); // NOI18N
        cep.setPreferredSize(new java.awt.Dimension(38, 25));
        cep.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cepActionPerformed(evt);
            }
        });
        cep.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                cepFocusLost(evt);
            }
        });
        jPanel3.add(cep, new org.netbeans.lib.awtextra.AbsoluteConstraints(67, 18, 112, -1));

        jLabel8.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jLabel8.setText("Cidade");
        jLabel8.setPreferredSize(new java.awt.Dimension(37, 25));
        jPanel3.add(jLabel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(191, 19, 60, -1));

        cidade.setEditable(false);
        cidade.setFocusable(false);
        jPanel3.add(cidade, new org.netbeans.lib.awtextra.AbsoluteConstraints(263, 19, 443, -1));

        jLabel9.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jLabel9.setText("UF");
        jLabel9.setPreferredSize(new java.awt.Dimension(37, 25));
        jPanel3.add(jLabel9, new org.netbeans.lib.awtextra.AbsoluteConstraints(705, 22, 40, -1));

        uf.setEditable(false);
        uf.setFocusable(false);
        jPanel3.add(uf, new org.netbeans.lib.awtextra.AbsoluteConstraints(757, 19, 60, -1));

        jLabel10.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jLabel10.setText("Logradouro");
        jLabel10.setPreferredSize(new java.awt.Dimension(37, 25));
        jPanel3.add(jLabel10, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 53, 80, -1));

        logradouro.setEditable(false);
        logradouro.setFocusable(false);
        jPanel3.add(logradouro, new org.netbeans.lib.awtextra.AbsoluteConstraints(104, 53, 370, -1));

        jLabel11.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jLabel11.setText("N°");
        jLabel11.setPreferredSize(new java.awt.Dimension(37, 25));
        jPanel3.add(jLabel11, new org.netbeans.lib.awtextra.AbsoluteConstraints(480, 55, 20, 20));

        numero.setEditable(false);
        jPanel3.add(numero, new org.netbeans.lib.awtextra.AbsoluteConstraints(500, 56, 50, -1));

        jLabel12.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jLabel12.setText("Bairro");
        jLabel12.setPreferredSize(new java.awt.Dimension(37, 25));
        jPanel3.add(jLabel12, new org.netbeans.lib.awtextra.AbsoluteConstraints(560, 55, 45, 20));

        bairro.setEditable(false);
        bairro.setFocusable(false);
        jPanel3.add(bairro, new org.netbeans.lib.awtextra.AbsoluteConstraints(604, 53, 210, -1));

        jLabel13.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jLabel13.setText("Atendimento: ");
        jLabel13.setPreferredSize(new java.awt.Dimension(37, 25));
        jPanel3.add(jLabel13, new org.netbeans.lib.awtextra.AbsoluteConstraints(6, 95, 96, -1));

        complemento.setEditable(false);
        jPanel3.add(complemento, new org.netbeans.lib.awtextra.AbsoluteConstraints(114, 93, 323, -1));

        jLabel18.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jLabel18.setText("Complemento End.: ");
        jLabel18.setPreferredSize(new java.awt.Dimension(37, 25));
        jPanel3.add(jLabel18, new org.netbeans.lib.awtextra.AbsoluteConstraints(449, 96, 126, -1));

        complementoEnd.setEditable(false);
        jPanel3.add(complementoEnd, new org.netbeans.lib.awtextra.AbsoluteConstraints(599, 93, 220, -1));

        jPanel1.add(jPanel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 227, 830, 130));

        jTabbedPane1.addTab("Dados do cliente", jPanel1);

        jPanel6.setBackground(new java.awt.Color(194, 194, 183));

        jPanel7.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Observações", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, new java.awt.Color(0, 44, 255)));

        jTextArea1.setColumns(20);
        jTextArea1.setRows(5);
        jScrollPane1.setViewportView(jTextArea1);

        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 825, Short.MAX_VALUE)
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 175, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 8, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 0, Short.MAX_VALUE))
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(180, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("Outras inf.", jPanel6);

        getContentPane().add(jTabbedPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 840, -1));

        jPanel4.setBackground(new java.awt.Color(194, 194, 183));
        jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Acoes", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, new java.awt.Color(0, 0, 255)));
        jPanel4.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        BtNovo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/Button Add.png"))); // NOI18N
        BtNovo.setMnemonic('n');
        BtNovo.setText("Novo");
        BtNovo.setToolTipText("Inserir Um Novo Usuário - Atalho (ALT + N)");
        BtNovo.setRolloverEnabled(false);
        BtNovo.setVerifyInputWhenFocusTarget(false);
        BtNovo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BtNovoActionPerformed(evt);
            }
        });
        jPanel4.add(BtNovo, new org.netbeans.lib.awtextra.AbsoluteConstraints(18, 18, 89, -1));

        btSalvar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/icontexto-webdev-ok-128x128.png"))); // NOI18N
        btSalvar.setMnemonic('s');
        btSalvar.setText("Salvar");
        btSalvar.setToolTipText("Salvar Usuário - Atalho (ALT + S)");
        btSalvar.setEnabled(false);
        btSalvar.setRolloverEnabled(false);
        btSalvar.setVerifyInputWhenFocusTarget(false);
        btSalvar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btSalvarActionPerformed(evt);
            }
        });
        jPanel4.add(btSalvar, new org.netbeans.lib.awtextra.AbsoluteConstraints(113, 18, 92, -1));

        btEditar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/edit.png"))); // NOI18N
        btEditar.setMnemonic('e');
        btEditar.setText("Alterar");
        btEditar.setToolTipText("ALterar Cadastro -  Atalho (ALT + E)");
        btEditar.setEnabled(false);
        btEditar.setRolloverEnabled(false);
        btEditar.setVerifyInputWhenFocusTarget(false);
        btEditar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btEditarActionPerformed(evt);
            }
        });
        jPanel4.add(btEditar, new org.netbeans.lib.awtextra.AbsoluteConstraints(211, 18, 98, -1));

        btExcluir.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/Button Delete.png"))); // NOI18N
        btExcluir.setMnemonic('x');
        btExcluir.setText("Excluir");
        btExcluir.setToolTipText("Excluir Usuário - Atalho (ALT + X)");
        btExcluir.setEnabled(false);
        btExcluir.setRolloverEnabled(false);
        btExcluir.setVerifyInputWhenFocusTarget(false);
        btExcluir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btExcluirActionPerformed(evt);
            }
        });
        jPanel4.add(btExcluir, new org.netbeans.lib.awtextra.AbsoluteConstraints(315, 18, 96, -1));

        btSair.setBackground(new java.awt.Color(255, 255, 255));
        btSair.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/Button Previous.png"))); // NOI18N
        btSair.setMnemonic('x');
        btSair.setText("Voltar");
        btSair.setToolTipText("Sair do Cadastro de Usuários - Atalho (ALT + X)");
        btSair.setRolloverEnabled(false);
        btSair.setVerifyInputWhenFocusTarget(false);
        btSair.addComponentListener(new java.awt.event.ComponentAdapter() {
            public void componentMoved(java.awt.event.ComponentEvent evt) {
                btSairComponentMoved(evt);
            }
        });
        btSair.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btSairActionPerformed(evt);
            }
        });
        jPanel4.add(btSair, new org.netbeans.lib.awtextra.AbsoluteConstraints(680, 18, 94, -1));

        btDesfazer.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/Button Reload.png"))); // NOI18N
        btDesfazer.setMnemonic('z');
        btDesfazer.setText("Desfazer");
        btDesfazer.setToolTipText("Desfazer Ação - Atalho (ALT + Z)");
        btDesfazer.setEnabled(false);
        btDesfazer.setRolloverEnabled(false);
        btDesfazer.setVerifyInputWhenFocusTarget(false);
        btDesfazer.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btDesfazerActionPerformed(evt);
            }
        });
        jPanel4.add(btDesfazer, new org.netbeans.lib.awtextra.AbsoluteConstraints(417, 18, 114, -1));

        btProximo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/Button Last.png"))); // NOI18N
        btProximo.setMnemonic('P');
        btProximo.setEnabled(false);
        btProximo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btProximoActionPerformed(evt);
            }
        });
        jPanel4.add(btProximo, new org.netbeans.lib.awtextra.AbsoluteConstraints(537, 18, 49, -1));

        btAnterior.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/Button First.png"))); // NOI18N
        btAnterior.setMnemonic('R');
        btAnterior.setEnabled(false);
        btAnterior.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btAnteriorActionPerformed(evt);
            }
        });
        jPanel4.add(btAnterior, new org.netbeans.lib.awtextra.AbsoluteConstraints(592, 18, 52, -1));

        getContentPane().add(jPanel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 435, 840, 70));

        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-855)/2, (screenSize.height-542)/2, 855, 542);
    }// </editor-fold>//GEN-END:initComponents

    public void populaComboFuncionarios() {
        for (Funcionarios f : listFuncionarios) {
            comboFuncionario.addItem(f.getNome_func());
        }
    }

    public static void populaCampos(Long idUsuario) {
        Clientes cliente = ClienteDao.retornaClientesPorId(idUsuario);
        if (cliente != null) {
            codigo.setText("" + cliente.getId_cliente());
            comboFuncionario.setSelectedItem(cliente.getId_funcionario().getNome_func());
            tipoPessoa.setSelectedItem(cliente.getPessoa());
            cpf_cnpj.setText(cliente.getCpf_cnpj());
            ie_rg.setText(cliente.getRg_ie());
            diaVencimento.setText("" + cliente.getDiaVencimento());
            telefone.setText(cliente.getTelefone1());
            celular.setText(cliente.getCelular());
            cliDesde.setDate(cliente.getCliente_desde());
            cep.setText(cliente.getCep().getCep());
            valorRecibo.setText("" + cliente.getValorRecibo());
            if (cliente.getPessoa().toString().equalsIgnoreCase("Fisica")) {
                NomeFantasia.setText(cliente.getRazaoSocial());
                razao.setText(null);
            } else {
                NomeFantasia.setText(cliente.getNomeFantasia());
                razao.setText(cliente.getRazaoSocial());
            }
            logradouro.setText(cliente.getCep().getLogradouro());
            bairro.setText(cliente.getCep().getBairro());
            uf.setText(cliente.getCep().getUf());
            cidade.setText(cliente.getCep().getCidade());
            complemento.setText(cliente.getComplemanto());
            numero.setText(cliente.getNumero());
            jTextArea1.setText(cliente.getObs());
            if (cliente.getComplementoEndereco() != null) {
                complementoEnd.setText(cliente.getComplementoEndereco());
            } else {
                complementoEnd.setText(new String());
            }

            btSalvar.setEnabled(false);
            btEditar.setEnabled(true);
            btExcluir.setEnabled(true);
            btDesfazer.setEnabled(true);
            BtNovo.setEnabled(true);
            btProximo.setEnabled(true);
            btAnterior.setEnabled(true);
        }
//        Utilitario.bloqueiaTodosCampos(rootPane);
    }

    private void tipoPessoaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tipoPessoaActionPerformed
        if (tipoPessoa.getSelectedItem().equals("..::  Selecione  ::..")) {
            cpf_cnpj.setToolTipText("Informe se o cliente é Pessoa Física ou Jurídica para Liberar este campo");
            ie_rg.setToolTipText("Informe se o cliente é Pessoa Física ou Jurídica para Liberar este campo");
            cpf_cnpj.setEditable(false);
            ie_rg.setEditable(false);
//            jTextField10.requestFocus();
        } else if (tipoPessoa.getSelectedItem().equals("Fisica")) {
            try {
                //comando para que quando é apagado o conteudo do campo fique vazio senao nao apaga
                cpf_cnpj.setFocusLostBehavior(cpf_cnpj.PERSIST);
                ie_rg.setFocusLostBehavior(ie_rg.PERSIST);
                cpf_cnpj.setText(null);
                ie_rg.setText(null);
                cpf_cnpj.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("###.###.###-##")));
                ie_rg.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("###############")));
                cpf_cnpj.setEditable(true);
                ie_rg.setEditable(true);
                cpf_cnpj.setToolTipText("Digite o CPF do Cliente");
                ie_rg.setToolTipText("Digite o RG do Cliente");
                labelRazao.setEnabled(false);
                razao.setEnabled(false);
                labelNomeFantasia.setEnabled(true);
                labelNomeFantasia.setText("Nome");
                NomeFantasia.setEnabled(true);

            } catch (ParseException ex) {
                Logger.getLogger(Fr_cliente.class.getName()).log(Level.SEVERE, null, ex);
            }
        } else if (tipoPessoa.getSelectedItem().equals("Juridica")) {
            try {
                //comando para que quando é apagado o conteudo do campo fique vazio senao nao apaga
                cpf_cnpj.setFocusLostBehavior(cpf_cnpj.PERSIST);
                ie_rg.setFocusLostBehavior(ie_rg.PERSIST);
                cpf_cnpj.setText(null);
                ie_rg.setText(null);
                cpf_cnpj.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##.###.###/####-##")));
                ie_rg.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##.###.###-#")));
                cpf_cnpj.setEditable(true);
                ie_rg.setEditable(true);
                cpf_cnpj.setToolTipText("Digite o CNJP do Cliente");
                ie_rg.setToolTipText("Digite a Inscricao Estadual do Cliente");
                labelRazao.setEnabled(true);
                razao.setEnabled(true);
                labelNomeFantasia.setEnabled(true);
                labelNomeFantasia.setText("Nome Fantasia");
                NomeFantasia.setEnabled(true);
            } catch (ParseException ex) {
                Logger.getLogger(Fr_cliente.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    }//GEN-LAST:event_tipoPessoaActionPerformed

    private void cepActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cepActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_cepActionPerformed

    private void cepFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_cepFocusLost
        BuscaEndereco(cep.getText());
    }//GEN-LAST:event_cepFocusLost

    private void BtNovoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BtNovoActionPerformed
        //limpo os campos
        Utilitario.liberaTodosCampos(rootPane);
        Utilitario.limparTodosCampos(rootPane);

        //botões
        btSalvar.setEnabled(true);
        btEditar.setEnabled(false);
        btExcluir.setEnabled(false);
        btDesfazer.setEnabled(true);
        btProximo.setEnabled(false);
        btAnterior.setEnabled(false);

        //endereço
        cidade.setEditable(false);
        logradouro.setEditable(false);
        bairro.setEditable(false);
        uf.setEditable(false);

        //foco
        comboFuncionario.requestFocus();
    }//GEN-LAST:event_BtNovoActionPerformed

    private void btSalvarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btSalvarActionPerformed
        try {
            if (comboFuncionario.getSelectedItem().toString().equalsIgnoreCase("..::  Selecione  ::..")) {
                JOptionPane.showMessageDialog(null, "Selecione o funcionário que atende este cliente!!");
                comboFuncionario.requestFocus();
            } else if (diaVencimento.getText().toString().equalsIgnoreCase("")) {
                JOptionPane.showMessageDialog(null, "Informe o dia de vencimento do cliente (Para a impressão do recibo)!!");
                diaVencimento.requestFocus();
            } else if (!Utilitario.IsNumber(diaVencimento.getText())) {
                JOptionPane.showMessageDialog(null, "O dia de vencimento deve ser um número de 0 a 31!!");
                diaVencimento.requestFocus();
            } else if (Integer.parseInt(diaVencimento.getText()) < 1 || Integer.parseInt(diaVencimento.getText()) > 31) {
                JOptionPane.showMessageDialog(null, "O dia de vencimento deve ser de 0 a 31!!");
                diaVencimento.requestFocus();
            } else if (valorRecibo.getText().toString().equalsIgnoreCase("")) {
                JOptionPane.showMessageDialog(null, "Informe o valor que será impressora na geração do recibo!!");
                valorRecibo.requestFocus();
            } else {
                Clientes cli = new Clientes();
                if (!codigo.getText().toString().equalsIgnoreCase("")) {
                    cli = ClienteDao.retornaClientesPorId(Long.parseLong(codigo.getText().trim()));
                    if (cli == null) {
                        cli = new Clientes();
                    }
                } else {
                    cli.setDatacadastro(new Date());
                }
                cli.setAlterado_dia(new Date());
                cli.setCelular(Utilitario.removeCaracterdeUmaString(celular.getText()));
                cli.setTelefone1(Utilitario.removeCaracterdeUmaString(telefone.getText()));
                cli.setCliente_desde(cliDesde.getDate());
                cli.setComplemanto(complemento.getText());
                cli.setCpf_cnpj(Utilitario.removeCaracterdeUmaString(cpf_cnpj.getText()));
                cli.setNumero(numero.getText());
                cli.setComplementoEndereco(complementoEnd.getText());
                if (tipoPessoa.getSelectedItem().toString().equalsIgnoreCase("..::  Selecione  ::..")) {
                    cli.setPessoa("Juridica");
                } else {
                    cli.setPessoa("" + tipoPessoa.getSelectedItem());
                }
                cli.setRg_ie(Utilitario.removeCaracterdeUmaString(ie_rg.getText()));
                cli.setDiaVencimento(Integer.parseInt(diaVencimento.getText()));
                if (valorRecibo.getText().trim().contains(",")) {
                    cli.setValorRecibo(new BigDecimal(Utilitario.removeVirgulaDosNumeros(valorRecibo.getText()).trim().replace(",", ".")));
                } else {
                    cli.setValorRecibo(new BigDecimal(valorRecibo.getText()));
                }
                cli.setObs(jTextArea1.getText());

                //pegando o funcionario 
                Funcionarios func = new Funcionarios();
                listFuncionarios = FuncionarioDao.retornaUsuarios();
                for (Funcionarios f : listFuncionarios) {
                    if (f.getNome_func().toString().equalsIgnoreCase(comboFuncionario.getSelectedItem().toString())) {
                        func = f;
                        break;
                    }
                }
                cli.setId_funcionario(func);

                //pegando o cep
                Cep c = CepDao.retornaUsuariosPorCep(cep.getText());
                if (c != null) {
                    cli.setCep(c);
                } else {
                    c = new Cep();
                    cli.setCep(c);
                }

                //verificando se é pessoa F ou J
                cli.setPessoa("" + tipoPessoa.getSelectedItem());
                if (tipoPessoa.getSelectedItem().toString().equalsIgnoreCase("fisica")) {
                    cli.setRazaoSocial(NomeFantasia.getText());
                } else {
                    cli.setRazaoSocial(razao.getText());
                    cli.setNomeFantasia(NomeFantasia.getText());
                }

                cli = cli.salvar();
                codigo.setText("" + cli.getId_cliente());

                btSalvar.setEnabled(false);
                btEditar.setEnabled(true);
                btExcluir.setEnabled(true);
                btDesfazer.setEnabled(false);
                btProximo.setEnabled(false);
                btAnterior.setEnabled(false);
                btAnterior.setEnabled(true);
                btProximo.setEnabled(true);
                //bloquando os campos
                Utilitario.bloqueiaTodosCampos(rootPane);
                listClientes = new ClienteDao().retornaClientes();
                JOptionPane.showMessageDialog(null, "Cliente salvo!!");
            }
        } catch (Exception e) {
            JOptionPane.showMessageDialog(null, "Erro: " + e);
        }
    }//GEN-LAST:event_btSalvarActionPerformed

    private void btEditarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btEditarActionPerformed
        Utilitario.liberaTodosCampos(rootPane);

        btSalvar.setEnabled(true);
        btExcluir.setEnabled(false);
        btEditar.setEnabled(false);
        btDesfazer.setEnabled(true);
        btProximo.setEnabled(false);
        btAnterior.setEnabled(false);

        //endereço
        cidade.setEditable(false);
        logradouro.setEditable(false);
        bairro.setEditable(false);
        uf.setEditable(false);
    }//GEN-LAST:event_btEditarActionPerformed

    private void btExcluirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btExcluirActionPerformed
        try {
            int f;
            Long idUsuario = Long.parseLong(codigo.getText().trim());
            Clientes usuario = ClienteDao.retornaClientesPorId(idUsuario);
            if (usuario != null) {
                String nomefun = razao.getText();
                f = JOptionPane.showConfirmDialog(this, "Tem certeza que deseja excluir o cadastro do funcionário  ** " + nomefun + " ** ?", "Confirmação", JOptionPane.YES_NO_OPTION);
                if (f == JOptionPane.YES_OPTION) {
                    //remove o usuario
                    usuario.deleta();
                    Utilitario.limparTodosCampos(rootPane);
                    btEditar.setEnabled(false);
                    btExcluir.setEnabled(false);
                    btDesfazer.setEnabled(false);
                    BtNovo.setEnabled(true);
                    btSalvar.setEnabled(false);
                    btProximo.setEnabled(false);
                    btAnterior.setEnabled(false);
                    listClientes = new ClienteDao().retornaClientes();

                    JOptionPane.showMessageDialog(null, "Funcionário ** " + nomefun + " ** Excluido com Sucesso!!!");
                }
            }
        } catch (Exception e) {
            JOptionPane.showMessageDialog(null, "Funcionário não pode ser excluido, pois possui cliente relacionado a ele.", "Atenção!!", JOptionPane.YES_NO_OPTION);
        }
    }//GEN-LAST:event_btExcluirActionPerformed

    private void btSairComponentMoved(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_btSairComponentMoved
        // TODO add your handling code here:
    }//GEN-LAST:event_btSairComponentMoved

    private void btSairActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btSairActionPerformed
        if (btSalvar.isEnabled()) {
            JOptionPane.showMessageDialog(null, "Salve seus Dados Antes de Sair!!!");
        } else {
            Index.fr_clientes = null;
            dispose();
        }
    }//GEN-LAST:event_btSairActionPerformed
    private void ProximoRegistro(String botao) {
        Long idAtual = Long.parseLong(codigo.getText());
        Boolean passou = false;
        Long ultimoId = listClientes.get(listClientes.size() - 1).getId_cliente();
        Long PrimeiroId = listClientes.get(0).getId_cliente();
        if (botao.toString().equalsIgnoreCase("Proximo")) {
            if (idAtual.longValue() + 1 <= ultimoId.longValue()) {
                btProximo.setEnabled(true);
                while (passou == false) {
                    for (Clientes c : listClientes) {
                        if ((idAtual.longValue() + 1) == c.getId_cliente().longValue()) {
                            populaCampos(idAtual + 1);
                            passou = true;
                            break;
                        }
                    }
                    idAtual++;
                }
            } else {
                btProximo.setEnabled(false);
            }
        } else {
            //botao anterior
            if (idAtual.longValue() > PrimeiroId.longValue()) {
                btAnterior.setEnabled(true);
                while (passou == false) {
                    for (Clientes c : listClientes) {
                        if ((idAtual.longValue() - 1) == c.getId_cliente().longValue()) {
                            populaCampos(idAtual - 1);
                            passou = true;
                            break;
                        }
                    }
                    idAtual--;
                }
            } else {
                btAnterior.setEnabled(false);
            }
        }
    }
    private void btDesfazerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btDesfazerActionPerformed
        Utilitario.limparTodosCampos(rootPane);
        Utilitario.bloqueiaTodosCampos(rootPane);
        //bloqueio os botoes para enabled
        btExcluir.setEnabled(false);
        btSalvar.setEnabled(false);
        btEditar.setEnabled(false);
        btDesfazer.setEnabled(false);
        btProximo.setEnabled(false);
        btAnterior.setEnabled(false);
    }//GEN-LAST:event_btDesfazerActionPerformed

    private void telefoneActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_telefoneActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_telefoneActionPerformed

    private void btProximoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btProximoActionPerformed
        ProximoRegistro("Proximo");
        Utilitario.bloqueiaTodosCampos(rootPane);
    }//GEN-LAST:event_btProximoActionPerformed

    private void btAnteriorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btAnteriorActionPerformed
        ProximoRegistro("Anterior");
        Utilitario.bloqueiaTodosCampos(rootPane);
    }//GEN-LAST:event_btAnteriorActionPerformed
    public void BuscaEndereco(String cep) {
        Cep c = CepDao.retornaUsuariosPorCep(cep);
        if (c != null) {
            cidade.setText(c.getCidade());
            uf.setText(c.getUf());
            logradouro.setText(c.getLogradouro());
            bairro.setText(c.getBairro());
            numero.requestFocus();
        } else {
            cidade.setText(null);
            uf.setText(null);
            logradouro.setText(null);
            bairro.setText(null);
            numero.requestFocus();
        }
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private static javax.swing.JButton BtNovo;
    private static javax.swing.JTextField NomeFantasia;
    private static javax.swing.JTextField bairro;
    private static javax.swing.JButton btAnterior;
    private static javax.swing.JButton btDesfazer;
    private static javax.swing.JButton btEditar;
    private static javax.swing.JButton btExcluir;
    private static javax.swing.JButton btProximo;
    private static javax.swing.JButton btSair;
    private static javax.swing.JButton btSalvar;
    private static javax.swing.JFormattedTextField celular;
    private static javax.swing.JFormattedTextField cep;
    private static javax.swing.JTextField cidade;
    private static com.toedter.calendar.JDateChooser cliDesde;
    private static javax.swing.JTextField codigo;
    private static javax.swing.JComboBox comboFuncionario;
    private static javax.swing.JTextField complemento;
    private static javax.swing.JTextField complementoEnd;
    private static javax.swing.JFormattedTextField cpf_cnpj;
    private static javax.swing.JTextField diaVencimento;
    private static javax.swing.JFormattedTextField ie_rg;
    private com.toedter.calendar.JDayChooser jDayChooser1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTabbedPane jTabbedPane1;
    private static javax.swing.JTextArea jTextArea1;
    private javax.swing.JLabel labelNomeFantasia;
    private javax.swing.JLabel labelRazao;
    private static javax.swing.JTextField logradouro;
    private static javax.swing.JTextField numero;
    private static javax.swing.JTextField razao;
    private static javax.swing.JFormattedTextField telefone;
    private static javax.swing.JComboBox tipoPessoa;
    private static javax.swing.JTextField uf;
    private static javax.swing.JTextField valorRecibo;
    // End of variables declaration//GEN-END:variables
}
